package cn.kgc.tangcco;

import org.junit.Test;

/**
 * @author 李昊哲
 * @Description
 * @date 2020/8/13 上午11:08
 */
public class Demo16 {
    @Test
    public void test01() {
        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < i; j++) {
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }

    @Test
    public void test02() {
        for (int i = 0; i < 3; i++) {
            // 外层循环一次 内层循环一周
            System.out.println("第" + (i + 1) + "个月");
            for (int j = 0; j < 4; j++) {
                System.out.println("\t第" + (j + 1) + "周");
            }
        }
    }

    @Test
    public void test03() {
        for (int i = 0; i < 9; i++) {
            for (int j = 0; j <= i; j++) {
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }
    @Test
    public void test04() {
        for (int i = 1; i < 10; i++) {
            for (int j = 01; j <= i; j++) {
                System.out.print(j + " * " + i + " = " + (i * j) + "\t");
            }
            System.out.print("\n");
        }
    }

}
